package shared;

import java.io.Serializable;

public class Message implements Serializable {
	private static final long serialVersionUID = 1L;

	private EnumType type;
	private String command;
	private byte[] byteArray;
	private int offset;
	private int byteArrayLength;
	private String fileName;
	private boolean first;
	private String selfPath;
	private String path;

	public Message(EnumType type) {
		this.type = type;
	}

	public Message(EnumType type, String command) {
		this.type = type;
		this.command = command;
	}
	
	public Message(EnumType type, String selfPath, String path) {
		this.type = type;
		this.selfPath = selfPath;
		this.path = path;
	}
	
	public Message(EnumType type, String command, boolean first) {
		this.type = type;
		this.command = command;
		this.first = first;
	}

	public Message(EnumType type, byte[] byteArray, int offset,
			int byteArrayLength, String fileName, String path) {
		this.type = type;
		this.byteArray = byteArray;
		this.offset = offset;
		this.byteArrayLength = byteArrayLength;
		this.fileName = fileName;
		this.path = path;
	}

	public String getCommand() {
		return command;
	}

	public EnumType getType() {
		return type;
	}

	public byte[] getByteArray() {
		return byteArray;
	}

	public int getOffset() {
		return offset;
	}

	public int getByteArrayLength() {
		return byteArrayLength;
	}
	
	public String getFileName() {
		return fileName;
	}
	
	public boolean isFirst() {
		return first;
	}
	
	public String getPath() {
		return path;
	}
	
	public String getSelfPath() {
		return selfPath;
	}
}